﻿@page "/logout"
@rendermode InteractiveServer
@using BlazorAuth.App.Components.Layout
@using BlazorAuth.App.Infrastructures
@using Microsoft.AspNetCore.Components.Authorization
@inject NavigationManager Navigation
@inject AuthenticationStateProvider AuthStateProvider

@code {
    protected override async Task OnInitializedAsync()
    {
        await ((CustomAuthStateProvider)AuthStateProvider).MarkUserAsLoggoutOut();
        Navigation.NavigateTo("/login");
    }
}